package web.fabrimind.pm.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import web.fabrimind.common.annotation.Excel;
import web.fabrimind.common.core.domain.BaseEntity;

/**
 * 生产工单对象 work_order
 * 
 * @author zhihui
 * @date 2025-03-25
 */
public class WorkOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 工单ID */
    private Long orderId;

    /** 工单编号 */
    @Excel(name = "工单编号")
    private String orderCode;

    /** 关联计划ID */
    @Excel(name = "关联计划ID")
    private Long planId;

    /** 产品ID */
    @Excel(name = "产品ID")
    private Long productId;

    /** 生产线ID */
    @Excel(name = "生产线ID")
    private Long lineId;

    /** 计划生产数量 */
    @Excel(name = "计划生产数量")
    private Long planQuantity;

    /** 完成数量 */
    @Excel(name = "完成数量")
    private Long finishedQuantity;

    /** 不良品数量 */
    @Excel(name = "不良品数量")
    private Long defectQuantity;

    /** 实际开始时间 */
    private Date startTime;

    /** 实际结束时间 */
    private Date endTime;

    /** 工单状态（0:未开始 1:进行中 2:已完成 3:已取消） */
    @Excel(name = "工单状态", readConverterExp = "0=:未开始,1=:进行中,2=:已完成,3=:已取消")
    private String status;


    /** 产品名称 */
    @Excel(name = "产品名称")
    private String productName;


    /** 生产线名称 */
    @Excel(name = "生产线名称")
    private String lineName;

    /** 关联计划名称 */
    @Excel(name = "关联计划名称")
    private String planName;

    public String getPlanName() {
        return planName;
    }

    public void setPlanName(String planName) {
        this.planName = planName;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getLineName() {
        return lineName;
    }

    public void setLineName(String lineName) {
        this.lineName = lineName;
    }

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setOrderCode(String orderCode) 
    {
        this.orderCode = orderCode;
    }

    public String getOrderCode() 
    {
        return orderCode;
    }
    public void setPlanId(Long planId) 
    {
        this.planId = planId;
    }

    public Long getPlanId() 
    {
        return planId;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setLineId(Long lineId) 
    {
        this.lineId = lineId;
    }

    public Long getLineId() 
    {
        return lineId;
    }
    public void setPlanQuantity(Long planQuantity) 
    {
        this.planQuantity = planQuantity;
    }

    public Long getPlanQuantity() 
    {
        return planQuantity;
    }
    public void setFinishedQuantity(Long finishedQuantity) 
    {
        this.finishedQuantity = finishedQuantity;
    }

    public Long getFinishedQuantity() 
    {
        return finishedQuantity;
    }
    public void setDefectQuantity(Long defectQuantity) 
    {
        this.defectQuantity = defectQuantity;
    }

    public Long getDefectQuantity() 
    {
        return defectQuantity;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderCode", getOrderCode())
            .append("planId", getPlanId())
            .append("productId", getProductId())
            .append("lineId", getLineId())
            .append("planQuantity", getPlanQuantity())
            .append("finishedQuantity", getFinishedQuantity())
            .append("defectQuantity", getDefectQuantity())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
